package cn.wenhe9.yygh.order.service;

import cn.wenhe9.yygh.common.result.ResultResponse;
import cn.wenhe9.yygh.model.order.OrderCountQueryVo;
import cn.wenhe9.yygh.model.order.OrderInfo;
import cn.wenhe9.yygh.model.vo.order.OrderQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @author DuJinliang
 * 2022/4/6
 */
public interface OrderService extends IService<OrderInfo> {

    /**
     * 生成订单
     * @param scheduleId String
     * @param patientId String
     * @return ResultResponse
     */
    Long saveOrder(String scheduleId, Long patientId);

    /**
     * 根据orderId获取订单
     * @param orderId String
     * @return ResultResponse
     */
    OrderInfo getOrderById(Long orderId);


    /**
     * 分页查询订单列表
     * @param pageParam Page<OrderInfo>
     * @param orderQueryVo OrderQueryVo
     * @return IPage<OrderInfo>
     */
    IPage<OrderInfo> getOrderListByPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);

    /**
     * 取消订单
     * @param orderId Long
     * @return ResultResponse
     */
    Boolean cancelOrder(Long orderId);

    /**
     * 就诊通知
     */
    void patientTips();

    /**
     * 预约统计
     * @param orderQueryVo OrderQueryVo
     * @return Map<String, Object>
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);
}
